/***********************************************************************
 * Module:  Category.java
 * Author:  Administrator
 * Purpose: Defines the Class Category
 ***********************************************************************/
package com.itnetwork.Entity;

import java.util.Set;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * callo 1.0
 * 
 */
@Entity
@Table(name = "category")
public class Category {
	public int cid;
	public String ctitle;
	public String cpersistentUrl;

	/**
	 */
	/*
	 * 此栏目新闻Set
	 */
	//public Set<News> news;
	/**
	 */
	/*
	 * 此栏目的子栏目
	 */
	//public Set<Category> subCategorys;
	/*
	 * 此栏目的父栏目
	 */
	public Category cparent;

	@Id
	@GeneratedValue
	public int getCid() {
		return cid;
	}

	public void setCid(int cid) {
		this.cid = cid;
	}

	public java.lang.String getCtitle() {
		return ctitle;
	}

	public void setCtitle(java.lang.String ctitle) {
		this.ctitle = ctitle;
	}

	public java.lang.String getCpersistentUrl() {
		return cpersistentUrl;
	}

	public void setCpersistentUrl(java.lang.String cpersistentUrl) {
		this.cpersistentUrl = cpersistentUrl;
	}
/*	@OneToMany(mappedBy="category")
	public java.util.Set<News> getNews() {
		return news;
	}

	public void setNews(java.util.Set<News> news) {
		this.news = news;
	}
	*/
	
/*	@OneToMany(mappedBy="cparent")
	public java.util.Set<Category> getSubCategorys() {
		return subCategorys;
	}

	public void setSubCategorys(java.util.Set<Category> subCategorys) {
		this.subCategorys = subCategorys;
	}*/
	
	@ManyToOne
	@JoinColumn(name="cparentId")
	public Category getCparent() {
		return cparent;
	}

	public void setCparent(Category cparent) {
		this.cparent = cparent;
	}

}